import groovy.text.StreamingTemplateEngine

// StreamingTemplateEngine 可处理大于64kb模板
def text = '''This Tutorial is <% out.print TutorialName %> The Topic name
    is ${TopicName}'''
def template = new StreamingTemplateEngine().createTemplate(text)

def binding = [TutorialName: "Groovy", TopicName: "Templates"]
String response = template.make(binding)
println response